package com.myBase.core.facade.service;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;

import com.myBase.core.base.entity.PageVo;
import com.myBase.core.entity.Goldcoin;
import com.myBase.core.entity.GoldcoinAccountDetail;
import com.myBase.core.entity.GoldcoinOrder;
import com.myBase.core.entity.GoldcoinTradeRecord;
import com.myBase.core.exception.PlatformException;

public interface GoldcoinAccountDetailServiceFacade {
    public GoldcoinAccountDetail get(String id);

    public List<GoldcoinAccountDetail> findList(GoldcoinAccountDetail goldcoinAccountDetail);

    public void save(GoldcoinAccountDetail goldcoinAccountDetail);

    public void delete(GoldcoinAccountDetail goldcoinAccountDetail);

    public Integer getSumGoldCoinByUserAndGoldCoinId(String accountId, String goldCoinPoolId);

    public void saveNewGoldCoinGrant(GoldcoinOrder goldcoinOrder, GoldcoinTradeRecord goldcoinTradeRecord,
            GoldcoinAccountDetail goldcoinAccountDetail, Goldcoin goldcoin) throws PlatformException;

    public Integer getSumAvailableGoldCoinByAccountId(String accountId);

    public ArrayList<GoldcoinAccountDetail> getParamsAvailableGoldCoinByAccountId(String accountId);

    public boolean updateGoldCoinDetailsByUseCoin(Integer useCoin, ArrayList<GoldcoinAccountDetail> list,
            Integer sumAvailableCoin, GoldcoinOrder goldcoinOrder, GoldcoinTradeRecord goldCoinTradeRecord)
            throws PlatformException;

    /**
     *getGoldTOBeFailureList(查询即将过期金币流水) 
     */
    public PageVo<HashMap<String, Object>> getGoldTOBeFailureList(PageVo<HashMap<String, Object>> page,
            GoldcoinAccountDetail goldAccountDetail) throws Exception;

    /**
     *getUserGoldSum(查询用户金币总数 和 即将过期数量) 
     */
    public HashMap<String, Object> getUserGoldSum(GoldcoinAccountDetail goldAccountDetail) throws Exception;

    /**
     * EBeiGoldCoinAccountDetailOverdueTrigger(goldcoinaccount_detail搜索endtime小于等于现在但是金币状体正常的数据) 
     */
    public ArrayList<GoldcoinAccountDetail> getOverdueBeanListGoldCoinAccountDetail();

    public void updateDetailSaveRradeRecord(GoldcoinTradeRecord goldcoinTradeRecord,
            GoldcoinAccountDetail goldcoinAccountDetail) throws PlatformException;

}
